package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PaymentChannelSettingsMapper;
import com.ruoyi.system.domain.PaymentChannelSettings;
import com.ruoyi.system.service.IPaymentChannelSettingsService;

/**
 * 支付通道设置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class PaymentChannelSettingsServiceImpl implements IPaymentChannelSettingsService
{
    @Autowired
    private PaymentChannelSettingsMapper paymentChannelSettingsMapper;

    /**
     * 通过id查询支付通道设置
     *
     * @param id 支付通道设置主键
     * @return 支付通道设置
     */
    @Override
    public PaymentChannelSettings selectPaymentChannelSettingsById(Long id)
    {
        return paymentChannelSettingsMapper.selectPaymentChannelSettingsById(id);
    }

    /**
     * 查询支付通道设置列表
     *
     * @param storeName 门店名称
     * @return 支付通道设置
     */
    @Override
    public List<PaymentChannelSettings> selectPaymentChannelSettingsListByName(String storeName)
    {
        return paymentChannelSettingsMapper.selectPaymentChannelSettingsListByName(storeName);
    }

    /**
     * 新增支付通道设置列表
     *
     * @param paymentChannelSettings 支付通道设置
     * @return 结果
     */
    @Override
    public int insertPaymentChannelSettings(PaymentChannelSettings paymentChannelSettings)
    {
        return paymentChannelSettingsMapper.insertPaymentChannelSettings(paymentChannelSettings);
    }

    /**
     * 修改支付通道设置列表
     *
     * @param paymentChannelSettings 支付通道设置
     * @return 结果
     */
    @Override
    public int updatePaymentChannelSettings(PaymentChannelSettings paymentChannelSettings)
    {
        return paymentChannelSettingsMapper.updatePaymentChannelSettings(paymentChannelSettings);
    }

    /**
     * 批量删除支付通道设置列表
     *
     * @param ids 需要删除的支付通道设置主键
     * @return 结果
     */
    @Override
    public int deletePaymentChannelSettingsByIds(Long[] ids)
    {
        return paymentChannelSettingsMapper.deletePaymentChannelSettingsByIds(ids);
    }

    /**
     * 删除支付通道设置信息列表
     *
     * @param id 支付通道设置主键
     * @return 结果
     */
    @Override
    public int deletePaymentChannelSettingsById(Long id)
    {
        return paymentChannelSettingsMapper.deletePaymentChannelSettingsById(id);
    }
}
